function UI_Ubicacion(id, rootID){
	
	var _this = this;
	var _domElement = $("#"+id).css({display: 'inline', padding : "2px"});
	var _domRootPanelElement = $("#"+rootID).css({'background-color': 'infotext', 'color' : '#fff'});;
	var _botonAbrir = $("#btnAbrirPanelUbicacion");
	var _botonCerrar = $("#btnCerrarPanelDataUbicacion");
	
	var visible = $(_domRootPanelElement).css('display') != 'none';
	
	this.isVisible = function(){
	//	visible = $(_domRootPanelElement).css('display') != 'none';
		return visible;	
	};
	
	this.data = function(innerHTML){
		$(_domElement).html(innerHTML);
	}
	
	this.append = function(innerHTML){
		$(_domElement).append(innerHTML);
	}
	
	this.toggle = function(){
		visible = $(_domRootPanelElement).css('display') != 'none';
		if (visible){
			$( _domRootPanelElement).hide();
			$(_botonAbrir).show();
		}
		else{
			$( _domRootPanelElement).show();
			$(_botonAbrir).hide();
		}
		visible = !visible;
	};
	
	var click = function(){_this.toggle();}
	$(_botonAbrir).click(click);	
	$(_botonCerrar).click(click);
	
	$( _domRootPanelElement).draggable({ cursor: 'pointer', /*containment: 'parent'*/ });
	
};